Skip to content

fix(legacy): handle cancelled source selection - #536

Open
Iams4kura wants to merge 1 commit into
GreyDGL:mainfrom
Iams4kura:bugfix/handle-cancelled-source-selection-20260818t160107z
Open

Iams4kura wants to merge 1 commit into
GreyDGL:mainfrom
Iams4kura:bugfix/handle-cancelled-source-selection-20260818t160107z

Conversation

@Iams4kura

Copy link
Copy Markdown

Summary

  • Fixes: When the source selector is cancelled with Ctrl-D, prompt_select returns None and input_handler raises TypeError while evaluating int(None) instead of returning to the main menu.
  • Root cause: The next-step input path assumes prompt_select always returns a numeric option and indexes options without handling its documented no-result exit path.

Closes #513

Regression evidence

  • Before: uv run python -m pytest tests/legacy/test_pentest_gpt.py -q exited 1

  • After: uv run python -m pytest tests/legacy/test_pentest_gpt.py -q exited 0

Verification

  • uv run python -m pytest tests/legacy/ -q
  • make ci

Scope

  • 2 files changed, +27 / -0 lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

1 participant